package complex.java.zip;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.zip.GZIPInputStream;

public class ReadEmployee {
	 public static void main(String argv[]) throws 
     Exception{
      //deserialize objects sarah and sam
      FileInputStream fis = new FileInputStream("d:\\dd.test");
      GZIPInputStream gs = new GZIPInputStream(fis);
      ObjectInputStream ois = new ObjectInputStream(gs);
      Employee sarah = (Employee) ois.readObject();
      Employee sam = (Employee) ois.readObject();
      //print the records after reconstruction of state
      sarah.print();
      sam.print();
      ois.close();
      fis.close();
   }
}
